package com.lufei4.chestnut.view;

import java.util.concurrent.TimeUnit;

import okhttp3.OkHttpClient;

public class GetOkHttpClient {

    public  static OkHttpClient getOkHttpClient() {
        return new OkHttpClient().newBuilder()
                .readTimeout(10, TimeUnit.SECONDS)
                .connectTimeout(10, TimeUnit.SECONDS)
                .writeTimeout(10, TimeUnit.SECONDS)
                .addInterceptor(new LogInterceptor())
                .retryOnConnectionFailure(false)
                .build();
    }

}
